package ch.fusun.baron.farm.ui;

import ch.fusun.baron.farm.Farm;
import ch.fusun.baron.map.ui.gef.editpart.TileChild;
import ch.fusun.baron.swt.isometry.components.Sprite;

/**
 * Tile child for farms
 */
public class FarmTileChild implements TileChild<Farm> {

	private static final String ICONS_FARM = "icons/farm.png"; //$NON-NLS-1$
	private static final String ICONS_FARM_MASK = "icons/farm_mask.png"; //$NON-NLS-1$
	private final Farm farm;

	/**
	 * @param farm
	 *            The farm
	 */
	public FarmTileChild(Farm farm) {
		this.farm = farm;
	}

	@Override
	public Farm getModel() {
		return this.farm;
	}

	@Override
	public Sprite getSprite() {
		return new Sprite(Activator.getImage(ICONS_FARM),
				Activator.getImage(ICONS_FARM_MASK), 10);
	}

}
